import { defineStore } from "pinia"
import hyRequest from "@/services/request"

// http://123.207.32.32:1888/api/city/all
const useCityStore = defineStore("city",{
    state:() => ({
        allCity:{},
        currentCity:{
            cityName:"广州"
        }
    }),
    actions:{
        async fetchAllCityAction() {
            const res = await hyRequest.get("/city/all")
            this.allCity = res.data.data
        }
    }
})

export default useCityStore